/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2022-10-13
 * Time:9:29
 */
public class Test {
    public static void main(String[] args) {
        MyList myList=new MyList();
        myList.creat();
        //打印里面的数据
        myList.display();
        System.out.println();
        //打印链表的长度
        System.out.println(myList.size());
        System.out.println();
        //删除第一次出现关键字为key的节点
        //myList.remove(4);
        //myList.display();
        //System.out.println();
        //删除所有的key
        //myList.removeAllKey(3);
        //myList.display();
        System.out.println(myList.contains(5));
        System.out.println();
        //myList.addFirst(3);
        //myList.addFirst(2);
        myList.display();
        System.out.println();
        myList.addIndex(3,100);
        myList.display();
        System.out.println();
        //移除一个数字
//        myList.addLast(213);
//        myList.display();
//        myList.remove(1323);
//        myList.display();
    }
}
